/*
 * Copyright 2013-2018 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.guodaxia.gzh.web;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Configuration;

import javax.annotation.PostConstruct;

/**
 * @author <a href="mailto:chenxilzx1@gmail.com">theonefx</a>
 */
@NoArgsConstructor
@AllArgsConstructor
@Data
@Slf4j
//@Configuration
public class User {

    private String name;

    private Integer age;

    private String password;


    void init(){
        System.out.println("ccc");
    }

    @PostConstruct
    void aVoid(){
        System.out.println("线程启动124");
        new Thread(new Runnable() {
            @Override
            public void run() {
                log.info("线程启动1");
                System.out.println("线程启动12");
                try {
                    while (true){
                        log.info("do deal");
                        int a=0/0;
                        Thread.sleep(2000);
                    }
                }catch (Exception e){
                    e.printStackTrace();
                }
            }
        }).start();


    }

}
